#include<stdio.h>
#include<string>
#include<string.h>
#include<iostream>
#include<math.h>
using namespace std;
string S1,S2,Ss;int len;bool C;
string sub(string Ss1,string Ss2)
{
    len=Ss1.size()-Ss2.size();
    for(int i=Ss2.size()-1;i>=0;i--)
        if(Ss1[len+i]<Ss2[i]+C)
            Ss=char(Ss1[len+i]-Ss2[i]-C+58)+Ss,C=true;
        else
            Ss=char(Ss1[len+i]-Ss2[i]-C+48)+Ss,C=false;
    for(int i=len-1;i>=0;i--)
        if(Ss1[i]-C>=48)
            Ss=char(Ss1[i]-C)+Ss,C=false;
        else
            Ss=char(Ss1[i]-C+10)+Ss,C=true;
    Ss.erase(0,Ss.find_first_not_of(48));
    return Ss;
}
int main()
{
    cin>>S1>>S2;
    if(S1.size()>S2.size()) 
        cout<<sub(S1,S2)<<endl;
    if(S1.size()<S2.size())  
        cout<<'-'<<sub(S2,S1)<<endl;
    if(S1.size()==S2.size()) 
        for(int i=0;i<S1.size();i++)
            if(int(S1[i])>int(S2[i]))
         	    {cout<<sub(S1,S2)<<endl;break;}
            else
		        if(int(S1[i])<int(S2[i]))
         	        {cout<<'-'<<sub(S2,S1)<<endl;break;}
         	    else
		            if(i==S1.size()-1&&int(S1[i])==int(S2[i]))
			  	        cout<<0;
     return 0;
}
